//教室数据库模型
const mongoose = require("mongoose");

const { Schema, model } = mongoose;

const RoomsSchema = new  Schema ({ 
  //楼名
  tower: { type: String, require: true }, 
  //楼层
  storey: { type: Number, require: true }, 
  //教室号
  room: { type: Number, require: true }, 
  //教室名  楼名+楼层+教室号
  roomName: { type: String, default: '' },
  //状态 1->待分配  2->可用  3->清理  4->维修  5->占用
  status: { type: Number, default: 1 }, 
  //介绍
  introduce:{ type: String, default: '' }, 
  //座位数量
  totalSeat: { type: Number, default: '' },
  //已占数量
  choosedSeat: { type: Number, default: '' },
});

const Rooms = model("Rooms", RoomsSchema);

module.exports = Rooms;